//------------------------------------------------------------------------------------
#ifndef __CSOUNDPLAYER_H__
#define __CSOUNDPLAYER_H__
//------------------------------------------------------------------------------------
#include <phonon/phonon>
#include <QBuffer>
//------------------------------------------------------------------------------------
class CSoundPlayer : public QObject {
	Q_OBJECT
    public:
        CSoundPlayer(QString source, QObject *parent=0);
        ~CSoundPlayer(void);
		void play(bool boucle);
		void stop(void);
	private:
		QBuffer *buffer;
		QByteArray *byteArray;
		Phonon::MediaObject *mediaObject;
		Phonon::AudioOutput *audioOutput;
		Phonon::MediaSource *mediaSource;
		bool boucle;
	private slots:
		void onFinished(void);
};
//------------------------------------------------------------------------------------
#endif //__CSOUNDPLAYER_H__
//------------------------------------------------------------------------------------
